<%@page import="cn.three.eneity.Classify"%>
<%@page import="java.util.List"%>
<%@page import="cn.three.biz.ClassifyBiz"%>
<%@page import="cn.three.eneity.Admin"%>
<%@page import="cn.three.eneity.Shop"%>
<%@page import="cn.three.biz.ShopdaoBiz"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	<div style="height: 50px;"><h2>修改商品</h2></div>
	<form action="editShopServlet" method="post">
 <%
       request.setCharacterEncoding("UTF-8");
       response.setCharacterEncoding("UTF-8");
       String id=request.getParameter("shopid");
       int shopId=Integer.parseInt(id);
       ShopdaoBiz biz=new ShopdaoBiz();
       Shop s=biz.getShopById(shopId);
       Admin admin = (Admin)session.getAttribute("admin");
       
       ClassifyBiz cbiz=new ClassifyBiz();
       List<Classify> list=cbiz.showClassify();
      %>
   
           <input type="hidden" name="shopid" size="50" value="<%=s.getShopId()  %>"/><br/><br/>
   商品类别: <select name="classify">
    <option value="<%=s.getClassify().getClassifyId() %>"><%=s.getClassify().getClassifyName()%> </option>
  <%    
       for(int i=0;i<list.size();i++){
    	   Classify cc=list.get(i);
       
    %>    <option value="<%=cc.getClassifyId() %>"><%=cc.getClassifyName() %></option>
    <%} %>
          </select><br/><br/>
  
    商家名称：<input type="text" name="adminn" value="<%=admin.getAdminName()%>" readonly="readonly"/><br/><br/>
    商品名称：<input type="text" name="shopname" size="50" value="<%=s.getShopName()%>"/><br/><br/>
    商品价格：<input type="text" name="shopprice" size="50" value="<%=s.getShopPrice()%>"/><br/><br/>
    商品详情：<input type="text" name="shopdetalis" size="50" value="<%=s.getShopDetails()%>"/><br/><br/>
    商品数量：<input type="text" name="shopcount" size="50" value="<%=s.getShopCount()%>"/><br/><br/>
    图片名称：<input type="text" name="pic" size="50" value="<%=s.getShopPic()%>"/><br/><br/>
    

  <br><br>
    <input type="submit" value="提交">
    
    
    </form>

</body>
</html>